using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Zoo;
using System.Collections.Specialized;

public partial class ZooMaster : System.Web.UI.MasterPage
{
    protected Zoo.Dictionary Dico;
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        Dico = Zoo.Dictionary.CreateFromCache(UserContext.Language,new ZooModel());
    }

    protected void Page_Load(object sender, EventArgs e)
    {     
        setLanguageVisibility(UserContext.Language);
    }



    void setLanguageVisibility(string lang)
    {
        foreach (Control ctrl in LanguagePicker.Controls)
        {
            HtmlAnchor btn = ctrl as HtmlAnchor;
            if (btn != null)
            {
                btn.Visible = (String.Compare(btn.ID,lang,true)!=0);
            }
        }
    }
  
   
    
}
